//
//  MKUITabBarContentViewContainer.h
//  MKUI
//	页签主体内容视图的容器
//  Created by sushangjin on 16/3/29.
//  Copyright © 2016年 sushangjin. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MKUITabBarContentView.h"
#import "MKUITabBarContentProtocol.h"
@class MKUITabBarController;
NS_ASSUME_NONNULL_BEGIN
@interface MKUITabBarContentContainer : UIView
@property(nonatomic,weak) MKUITabBarController *tabBarController;//弱引用tab控制器
@property(nonatomic,strong,nullable) NSArray<id<MKUITabBarContentProtocol>> *contents;
@property(nonatomic,assign) NSInteger selectedIndex;//手动改变并不会刷新UI，需要调用setSelectedIndex:animated:方法
@property(nonatomic,readonly,nullable) NSArray<__kindof UITabBarItem *> *tabBarItems;
- (BOOL)canScrollContentView;//是否能滚动切换内容

- (void)reloadData;//刷新UI
//刷新UI，并显示动画效果
- (void)reloadDataWithAnimated:(BOOL)animated;

//改变选中项，并刷新UI
- (void)setSelectedIndex:(NSInteger)index animated:(BOOL)animated;
@end

@interface MKUITabBarContentContainer(selectedTabBarContentView)
@property(nonatomic,strong,nullable) id<MKUITabBarContentProtocol>selectedContent;
@end
NS_ASSUME_NONNULL_END
